<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>站点管理</title>
	<meta name="decorator" content="default"/>
</head>
<body>
	<ul class="nav nav-tabs">
		<shiro:hasPermission name="report:config:view"><li class="active"><a href="${ctx}/report/config/">配置列表</a></li></shiro:hasPermission>
		<shiro:hasPermission name="cms:site:edit"><li><a href="${ctx}/report/config/form">新增报表</a></li></shiro:hasPermission>
	</ul>

	<form:form id="searchForm" modelAttribute="tfEcReportConfig" action="${ctx}/report/config/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<label>报表名称：</label><form:input path="reportName" htmlEscape="false" maxlength="50" class="input-small"/>&nbsp;
		<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>&nbsp;&nbsp;
	</form:form>

	<sys:message content="${message}"/>

	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<td>报表id</td>
				<td>报表名称</td>
				<td>归属子系统</td>
				<td>查询sql</td>
				<td>是否支持导出</td>
				<td>备注</td>
				<td>配置人</td>
				<shiro:hasPermission name="cms:site:edit">
					<th class="al">操作</th>
				</shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="report">
			<tr class="erow">
				<td>${report.reportId}</td>
				<td><a href="${ctx }/report/produce?reportId=${report.reportId}" title="${report.reportName}">${fns:abbr(report.reportName,40)}</a></td>
				<td>
					<c:if test="${report.subSysCode=='EB010'}">HUI买</c:if>
					<c:if test="${report.subSysCode=='EB011'}">HUI伙</c:if>
				</td>
				<td>
					<a href="javascript:void(0);" onclick="showDetailPop('${report.reportId}_sqlRef')">
							${fn:escapeXml(fn:substring(report.sqlRef,0,10))}<c:if test="${fn:length(report.sqlRef)>10}">...</c:if>
					</a>
					<div id="${report.reportId}_sqlRef" style="display: none">${fn:escapeXml(report.sqlRef)}</div>
				</td>
				<td>
					<c:if test="${report.isExport=='0'}">否</c:if>
					<c:if test="${report.isExport=='1'}">是</c:if>
				</td>
				<td>
					<a href="javascript:void(0);" onclick="showDetailPop('${report.reportId}_remark')">
							${fn:escapeXml(fn:substring(report.remark,0,10))}<c:if test="${fn:length(report.remark)>10}">...</c:if>
					</a>
					<div id="${report.reportId}_remark" style="display: none">${fn:escapeXml(report.remark)}</div>
				</td>
				<td>${report.inStaffId}</td>
				<td class="al">
					<div class="manage1 al">
						<shiro:hasPermission name="report:configIn:view">
							<a href="${ctx}/report/configIn/list?reportId=${report.reportId }" class="font-blue mgr-10">输入</a>
						</shiro:hasPermission>
						<shiro:hasPermission name="report:configOut:view">
							<a href="${ctx}/report/configOut/list?reportId=${report.reportId }" class="font-blue">输出</a>
						</shiro:hasPermission>
					</div>
					<div class="manage1 al">
						<shiro:hasPermission name="report:config:edit">
							<a href="${ctx }/report/config/form?reportId=${report.reportId}" class="font-blue mgr-10" >修改</a>
							<a href="${ctx}/report/config/delete?reportId=${report.reportId}" onclick="return confirmx('确认删除吗？',this.href)" class="font-blue">删除</a>
						</shiro:hasPermission>
					</div>
					<div class="manage1 al" style="display: none;">
						<shiro:hasPermission name="report:config:edit">
							<a href="${ctx }/report/config/form?reportId=${report.reportId}" class="font-blue mgr-10" >手动执行</a>
						</shiro:hasPermission>
					</div>
				</td>
			</tr>
		</c:forEach>


		<%--<c:forEach items="${page.list}" var="site">--%>
			<%--<tr>--%>
				<%--<td><a href="${ctx}/cms/site/form?id=${site.id}" title="${site.name}">${fns:abbr(site.name,40)}</a></td>--%>
				<%--<td>${fns:abbr(site.title,40)}</td>--%>
				<%--<td>${fns:abbr(site.description,40)}</td>--%>
				<%--<td>${fns:abbr(site.keywords,40)}</td>--%>
				<%--<td>${site.theme}</td>--%>
				<%--<shiro:hasPermission name="cms:site:edit"><td>--%>
    				<%--<a href="${ctx}/cms/site/form?id=${site.id}">修改</a>--%>
					<%--<a href="${ctx}/cms/site/delete?id=${site.id}${site.delFlag ne 0?'&isRe=true':''}" onclick="return confirmx('确认要${site.delFlag ne 0?'恢复':''}删除该站点吗？', this.href)" >${site.delFlag ne 0?'恢复':''}删除</a>--%>
				<%--</td></shiro:hasPermission>--%>
			<%--</tr>--%>
		<%--</c:forEach>--%>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>